package org.zxp.encryption;

import com.xiaoleilu.hutool.crypto.SecureUtil;
import com.xiaoleilu.hutool.crypto.symmetric.DES;
import com.xiaoleilu.hutool.crypto.symmetric.SymmetricAlgorithm;

import java.nio.charset.StandardCharsets;

public class DESTest {
    public static void main(String[] args) {
        String content = "这里是报文内容";
        String key = "flamingo";
        String encrypt = DESUtil.encrypt(key, content);
        String decrypt = DESUtil.decrypt(key, encrypt);


        System.out.println(encrypt);
        System.out.println(decrypt);
    }
}
